package model

import (
	"gin_api/global"
)

type User struct {
	Username string `json:"username"`
	Password string `json:"-"`
	Status   int8   `json:"status"`
	Model
}

const (
	StatusOK   = 1
	StatusDeny = 2
)

func (u *User) FindUser() *User {
	global.DB.Where(u).First(u)
	return u
}
